home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
126-150
/
disk_147
/
termlib
/
termlib.zoo
/
isdigit.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-07-25
|
1KB
|
57 lines
/************************************************************************
* *
* Copyright (c) 1982, Fred Fish *
* All Rights Reserved *
* *
* This software and/or documentation is released for public *
* distribution for personal, non-commercial use only. *
* Limited rights to use, modify, and redistribute are hereby *
* granted for non-commercial purposes, provided that all *
* copyright notices remain intact and all changes are clearly *
* documented. The author makes no warranty of any kind with *
* respect to this product and explicitly disclaims any implied *
* warranties of merchantability or fitness for any particular *
* purpose. *
* *
************************************************************************
*/
/*
* LIBRARY FUNCTION
*
* isdigit test character for numeric property
*
* SYNOPSIS
*
* int isdigit(ch)
* char ch;
*
* DESCRIPTION
*
* Returns TRUE or FALSE depending upon whether the specified
* character is a numeric character or not.
*
* BUGS
*
* May fail on machines in which native character set is not ASCII.
*
*/
#include <stdio.h>
#define TRUE 1
#define FALSE 0
int isdigit(ch)
char ch;
{
if (ch > '9' || ch < '0') {
return(FALSE);
} else {
return(TRUE);
}
}